// pages/home/home.js
Page({
  tap(e){
    // console.log(e);
    console.log(e.currentTarget.dataset.item);
    
    // console.log('被点击了'); 
    
  },
  /**
   * 页面的初始数据
   */
  data: {
    name:"廖紫薇",
    num:10087,
    age:18,
    arr:[
      "黄焖鸡",
      "紫薇麻辣烫",
      "刘玥锅贴",
      "犟骨头"
    ],
    color1:"orange",
    imgSrc:"https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20190802%2Fc197e658b558402f8eff587afa993f4b.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630218815&t=dccac91503a4ed394bd89cfdf7b40088",
    imgs:[
      "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20190802%2Fc197e658b558402f8eff587afa993f4b.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630218815&t=dccac91503a4ed394bd89cfdf7b40088",
      "https://img2.baidu.com/it/u=567258541,2668572256&fm=26&fmt=auto&gp=0.jpg",
      "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F11798836048%2F0.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630220061&t=b2fe9530f19265052c3f1b11552fa06e"
    ]

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log("onload");

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    //这里相当于vue里面的Mounted
    console.log('onready');
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    console.log('onshow');
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    console.log('onHide');
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    //学了路由才能看到这个效果
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    console.log('下拉了');
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    console.log('点击分享');
    
  }
})